libxc/unlz4: always set an error return code on failures
authorJan Beulich <JBeulich@suse.com>
Fri, 24 Jan 2014 08:01:21 +0000 (08:01 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 28 Jan 2014 11:13:07 +0000 (11:13 +0000)
commitcbe6ab84f6dbf68a5c79cb70e09f5c3a8f77b9e1
tree83bbd06852f89813bb4444b03bcae97553c60e77
parent5fd5df08710fd1daac5d5faecd40cb2520ff52db
libxc/unlz4: always set an error return code on failures

"ret", being set to -1 early on, gets cleared by the first invocation
of lz4_decompress()/lz4_decompress_unknownoutputsize(), and hence
subsequent failures wouldn't be noticed by the caller without setting
it back to -1 right after those calls.

Linux commit: 2a1d689c9ba42a6066540fb221b6ecbd6298b728

Reported-by: Matthew Daley <mattjd@gmail.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_dom_decompress_lz4.c